//
//  Button.m
//  YYZB
//
//  Created by 顾悦 on 16/3/28.
//
//

#import "Button.h"

#import "ThemeColor.h"

@implementation Button

- (void)awakeFromNib {
    self.backgroundColor = [ThemeColor orangeColor];
    self.layer.cornerRadius = 5.0;
    self.clipsToBounds = YES;
}

- (void)setEnabled:(BOOL)enabled {
    [super setEnabled:enabled];
    if (enabled) {
        self.backgroundColor = [ThemeColor orangeColor];
    } else {
        self.backgroundColor = [UIColor grayColor];
    }
}

- (void)setTitle:(NSString *)title {
    [self setTitle:title forState:UIControlStateNormal];
    [self setTitle:title forState:UIControlStateDisabled];
}

@end
